/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { Announcement } from '../models/Announcement';
import type { BaseResponse_Announcement_ } from '../models/BaseResponse_Announcement_';
import type { BaseResponse_List_Announcement_ } from '../models/BaseResponse_List_Announcement_';

import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';

export class AnnouncementControllerService {

    /**
     * 查询公告
     * @returns BaseResponse_List_Announcement_ OK
     * @throws ApiError
     */
    public static getAnnouncementUsingGet(): CancelablePromise<BaseResponse_List_Announcement_> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/api/announcement/get',
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

    /**
     * 保存公告
     * @param announcement announcement
     * @returns BaseResponse_Announcement_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static saveAnnouncementUsingPost(
announcement: Announcement,
): CancelablePromise<BaseResponse_Announcement_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/announcement/save',
            body: announcement,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }

}
